;======================================================================
NES_8KB_CHR_RAM_SIZE        =   1   ;8KB CHR RAM 大小数量
CHR_DATA_BANK               =   MENU_DATA_BANK - NES_8KB_CHR_RAM_SIZE
CHR_DATA_ADDR               =   $A000
;======================================================================
GAME_COUNT                  =   256          ;节目总数
GAME_NAME_POS               =   $2086       ;节目文本显示位置
GAME_NAME_LINE_SPACING      =   2           ;节目文本行间距
GAME_NAME_PAGE_SIZE         =   8           ;单页显示节目数
GAME_CURSOR_TILE_ID         =   $1F         ;光标图案ID
GAME_CURSOR_OFFSET_X        =   -1          ;光标横坐标补充
GAME_CURSOR_OFFSET_Y        =   0           ;光标纵坐标补充
GAME_NAME_PPU_BUF_COUNT     =   1           ;单次写入节目名数量
GAME_ENTER_TIME_DELAY       =   060         ;进入节目延迟帧数(1秒 = 60帧)
CHAR_MAPPING_ENABLE         =   0           ;字符映射
CURSOR_ELAY_ENABLE          =   0           ;光标延迟显示(刷新显示到选择项时才显示光标)
GAME_PAGE_MAX_INDEX         =   ((GAME_COUNT - 1) / GAME_NAME_PAGE_SIZE) * GAME_NAME_PAGE_SIZE
HSCROLL_OFFSET              =   0
VSCROLL_OFFSET              =   $E0
;======================================================================
MENU_IN_TIME                =   00      ;菜单进入延迟时间
MENU_OUT_TIME               =   08      ;菜单离开延迟时间
BKG_PAL_UPDATE_TIME         =   25      ;背景调色板更新间隔
SP_PAL_UPDATE_TIME          =   20      ;精灵调色板更新间隔
CHR_UPDATE_TIME             =   11      ;CHR更新间隔
FADE_IN_TIME                =   08      ;渐入时间间隔
FADE_OUT_TIME               =   08      ;渐出时间间隔
BKG_PAL_UPDATE_ENABLE       =   1       ;启用背景调色板更新
SP_PAL_UPDATE_ENABLE        =   1       ;启用精灵调色板更新
;======================================================================
;音乐相关配置常量
CUSTOM_MUSIC_ENABLE         =   0       ;启用自定义音乐
BGM_PLAY_TIME_DELAY         =   10      ;背景音乐播放延迟帧数(1秒 = 60帧)

;音乐配置
Music_Init_Addr             =   $BBF0   ;音乐选曲地址
Music_Play_Addr             =   $80D5   ;音乐播放地址(在NMI中播放)
;音乐相关配置常量
MUSIC_BGM                   =   008     ;背景音乐
MUSIC_ITEM                  =   021     ;选项改变音效
MUSIC_PAGE                  =   026     ;翻页音效
MUSIC_ENTER                 =   039     ;进入节目音效

;======================================================================
;音乐数据
 .IF CUSTOM_MUSIC_ENABLE
    .BANK MUSIN_DATA_BANK & BANK_DATA_MASK
    ;.INCBIN "default/contra.bin"
    
    .BANK PRG_DATA_BANK_C000 & BANK_DATA_MASK
    ;.INCBIN "default/contra.dmc"
 .ENDIF

;======================================================================
;CHR图形数据
    .IF NES_8KB_CHR_SIZE > 0
        .BANK (NES_16KB_PRG_SIZE * 2)
    .ELSE
        .BANK CHR_DATA_BANK & BANK_DATA_MASK
    .ENDIF
    
    .INCBIN "default/bkg.chr"
    .INCBIN "default/sp.chr"

;======================================================================
;菜单数据
    .BANK MENU_DATA_BANK & BANK_DATA_MASK
    .ORG MENU_DATA_ADDR
;----------------------------------------
;命令表数据
Nametable_Data
    .INCBIN "default/background.nam"

;----------------------------------------
;字符映射数据
Char_Mapping_Data
    .IF CHAR_MAPPING_ENABLE
        .INCBIN "default/char_mapping.bin"
    .ENDIF
    
;----------------------------------------
;调色板数据
Palette_Data
    .INCBIN "default/bg_palette.bin"
    .INCBIN "default/sp_palette.bin"
    
;----------------------------------------
;属性表数据
Attributes_Data
    .INCBIN "default/attributes.attr"

    .IF BKG_PAL_UPDATE_ENABLE
;======================================================================
;背景调色板数据
Bkg_Pal_Data_00 .DB $0F,$20,$27,$22,$0F,$24,$24,$24,$0F,$21,$21,$21,$0F,$22,$22,$22
Bkg_Pal_Data_01 .DB $0F,$10,$17,$12,$0F,$14,$14,$14,$0F,$11,$11,$11,$0F,$12,$12,$12
Bkg_Pal_Data_02 .DB $0F,$00,$07,$02,$0F,$04,$04,$04,$0F,$01,$01,$01,$0F,$02,$02,$02
;======================================================================
;背景调色板索引
Bkg_Pal_Data_Index
    .DW Bkg_Pal_Data_00
    .DW Bkg_Pal_Data_01
    .DW Bkg_Pal_Data_02
    .DW Bkg_Pal_Data_01
Bkg_Pal_Data_Index_End
;======================================================================
;背景调色板数量
BKG_PAL_COUNT   = (Bkg_Pal_Data_Index_End - Bkg_Pal_Data_Index) / 2
    .ENDIF

    .IF SP_PAL_UPDATE_ENABLE
;======================================================================
;精灵调色板数据
Sp_Pal_Data_00 .DB $0F,$20,$26,$16,$0F,$24,$24,$24,$0F,$26,$26,$26,$0F,$2A,$2A,$2A
Sp_Pal_Data_01 .DB $0F,$10,$16,$06,$0F,$24,$24,$24,$0F,$26,$26,$26,$0F,$2A,$2A,$2A
Sp_Pal_Data_02 .DB $0F,$00,$06,$06,$0F,$24,$24,$24,$0F,$26,$26,$26,$0F,$2A,$2A,$2A
;======================================================================
;精灵调色板索引
Sp_Pal_Data_Index
    .DW Sp_Pal_Data_00
    .DW Sp_Pal_Data_01
    .DW Sp_Pal_Data_02
    .DW Sp_Pal_Data_01
Sp_Pal_Data_Index_End
;======================================================================
;精灵调色板数量
SP_PAL_COUNT    = (Sp_Pal_Data_Index_End - Sp_Pal_Data_Index) / 2
    .ENDIF

;======================================================================
;背景调色板渐变数据
Bkg_Pal_Fade_Data_00 .DB $0F,$00,$07,$02,$0F,$04,$04,$04,$0F,$01,$01,$01,$0F,$02,$02,$02
Bkg_Pal_Fade_Data_01 .DB $0F,$10,$17,$12,$0F,$14,$14,$14,$0F,$11,$11,$11,$0F,$12,$12,$12
Bkg_Pal_Fade_Data_02 .DB $0F,$20,$27,$22,$0F,$24,$24,$24,$0F,$21,$21,$21,$0F,$22,$22,$22
;======================================================================
;背景调色板渐变索引
Bkg_Pal_Fade_Index
    .DW Bkg_Pal_Fade_Data_00
    .DW Bkg_Pal_Fade_Data_01
    .DW Bkg_Pal_Fade_Data_02
    .DW Bkg_Pal_Fade_Data_01
Bkg_Pal_Fade_Index_End
;背景调色板渐变数量
;======================================================================
BKG_PAL_FADE_COUNT = (Bkg_Pal_Fade_Index_End - Bkg_Pal_Fade_Index) / 2

;======================================================================
;精灵调色板渐变数据
Sp_Pal_Fade_Data_00 .DB $0F,$20,$26,$16,$0F,$24,$24,$24,$0F,$26,$26,$26,$0F,$2A,$2A,$2A
Sp_Pal_Fade_Data_01 .DB $0F,$10,$16,$16,$0F,$14,$14,$14,$0F,$16,$16,$16,$0F,$1A,$1A,$1A
Sp_Pal_Fade_Data_02 .DB $0F,$00,$06,$06,$0F,$04,$04,$04,$0F,$06,$06,$06,$0F,$0A,$0A,$0A
;======================================================================
;精灵调色板渐变索引
Sp_Pal_Fade_Index
    .DW Sp_Pal_Fade_Data_00
    .DW Sp_Pal_Fade_Data_01
    .DW Sp_Pal_Fade_Data_02
    .DW Sp_Pal_Fade_Data_01
Sp_Pal_Fade_Index_End
;======================================================================
;精灵调色板渐变数量
SP_PAL_FADE_COUNT = (Sp_Pal_Fade_Index_End - Sp_Pal_Fade_Index) / 2

;======================================================================
;CHR图案bank数据
CHR_Data_00 .DB $00,$02,$04,$05,$06,$07
CHR_Data_01 .DB $00,$02,$04,$05,$06,$07
CHR_Data_02 .DB $00,$02,$04,$05,$06,$07
CHR_Data_03 .DB $00,$02,$04,$05,$06,$07
;======================================================================
;CHR图案bank数据索引
Chr_Data_Index
    .DW CHR_Data_00
    .DW CHR_Data_01
    .DW CHR_Data_02
    .DW CHR_Data_03
Chr_Data_Index_End
;======================================================================
;CHR数量
CHR_COUNT       = (Chr_Data_Index_End - Chr_Data_Index) / 2
